print('Hello world')
print(r'\t')
print('''line1
    line2
    line3''')

a=1
t_007= '002'
answer= True

print(5/2)
print(5//2)
print(5%2)

print(ord('a'))
print(chr(97))

# Python对bytes类型的数据用带b前缀的单引号或双引号表示
print('ABC'.encode('ascii'))
print('中文'.encode('utf-8'))

print(b'\xe4\xb8\xad\xff'.decode('utf-8', errors='ignore'))

print(len('123'))
len('示'.encode('utf-8'))

print('A->%s<-A' % '123')
print('{0}'.format('123'))
str = 'qwe'
print(f'{str}')

arry = ['A','B','C']
print(arry[0])
print(arry[-1])

arry.append('D')
# 要删除list末尾的元素
arry.pop()

L = ['Apple', 123, True]
s=['A',['A','B','C']]

# tuple一旦初始化就不能修改
classmates = ('Michael', 'Bob', 'Tracy')

# 数字
t=(1)
# 元组
t = (1,)
t=()


if 100>200:
    print('nitianle')
    print('nitianle')
elif 200>100:
    print('a')
else:
    print('b')

for x in arry:
    print(x)

print(list(range(5)))

# dict
names={'tom':1,'emma':2,'trump':3}
print(names['tom'])
names['tom']=2
print('tom' in names)
print(names.get('t'))
print(names.get('t','NoNoNo'))

# set
s= set([1,1,1,2,3,4,5])
print(s)
s.add(10)
s.remove(1)
print(s)

s1 = set([1, 2, 3])
s2 = set([2, 3, 4])
s1 & s2
s1 | s2